package com.literature.search.user.service;

import com.literature.search.core.entity.R.AjaxJson;
import com.literature.search.core.entity.User;
import com.literature.search.core.entity.dto.BasePageDTO;
import com.literature.search.user.dto.LoginUserDTO;
import com.literature.search.user.dto.RegistryUserDTO;
import com.literature.search.user.dto.UserDTO;
import org.springframework.web.multipart.MultipartFile;

import java.io.InputStream;
import java.util.List;

/**
 * @Author: DangKong
 * @Date: 2023/3/2 00:26
 * @Description:
 */


public interface IUserService {

        /**
        * 用户登录
        * @param user
        * @return
        */
        AjaxJson login(LoginUserDTO user);

        User register(RegistryUserDTO user);

        AjaxJson getUserInfoById(String userId);

        AjaxJson updateUserInfo(UserDTO userDTO);

        AjaxJson changeAvatar(MultipartFile file);

        String uploadAvatarToGridFs(String prefix, InputStream in, String contentType);

        byte[] getAvatarBytes(String avatar);

        AjaxJson getUserListByPage(BasePageDTO pageDTO);

        AjaxJson blockUser(List<String> userIds);

        AjaxJson registerAdmin(RegistryUserDTO user);
}
